package com.mucd.chat.controller;

import com.mucd.chat.service.FriendService;
import com.ruoyi.common.core.domain.FriendDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.vo.Friend;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author mucd
 */
@RequestMapping("friend")
@RestController
public class FriendController {

    @Resource
    private FriendService friendService;

    @PostMapping(value = "find")
    public R<?> findUser(@RequestBody(required = false) String searchText) {
        return R.ok(friendService.find(searchText));
    }

//    @PostMapping(value = "addFriend")
//    public R<?> addFriend(@RequestBody Friend friend) {
//        return R.ok(friendService.addFriend(friend));
//    }

//    @PostMapping(value = "selectNoticeCount")
//    public R<?> selectNoticeCount() {
//        return R.ok(friendService.selectNoticeCount());
//    }

//    @PostMapping(value = "selectFriendNew")
//    public R<?> selectFriendNew() {
//        return R.ok(friendService.selectFriendNew());
//    }

//    @PostMapping(value = "confirmOrRejectFriend")
//    public R<?> confirmOrRejectFriend(@RequestBody FriendDto dto) {
//        return R.ok(friendService.confirmOrRejectFriend(dto));
//    }

    @PostMapping(value = "selectFriendList")
    public R<?> selectFriendList() {
        return R.ok(friendService.selectFriendList());
    }


}
